﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tuwen_shucai_edit.aspx.cs" Inherits="MxWeiXinPF.Web.admin.crm.tuwen_shucai_edit" ValidateRequest="false" %>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
    <title>编辑图文-文章信息</title>
   <%=PageJSAndStype("edit").ToString() %>

    <style>
        #has_pic {
        background-color:#FAAEAE;
        opacity:0.5;
        text-align:center;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            
            //初始化编辑器
            var editor = KindEditor.create('.editor', {
                width: '98%',
                height: '350px',
                resizeType: 1,
                uploadJson: '../../tools/upload_ajax.ashx?action=EditorFile&IsWater=1',//指定上传文件的服务器端程序。
                fileManagerJson: '../../tools/upload_ajax.ashx?action=ManagerFile',//指定浏览远程图片的服务器端程序。
                allowFileManager: true//rue时显示浏览远程服务器按钮。
            });
            var editorMini = KindEditor.create('.editor-mini', {
                width: '98%',
                height: '250px',
                resizeType: 1,
                uploadJson: '../../tools/upload_ajax.ashx?action=EditorFile&IsWater=1',
                items: [
                    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                    'insertunorderedlist', '|', 'emoticons', 'image', 'link']//配置编辑器的工具栏，其中”/”表示换行，”|”表示分隔符。
            });
           
   //初始化上传控件
        $(".upload-img").InitUploader({ filesize: "<%=siteConfig.imgsize %>", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf", filetypes: "<%=siteConfig.fileextension %>" });
       
        $(".upload-album").InitUploader({ btntext: "批量上传", multiple: true, water: true, thumbnail: true, filesize: "<%=siteConfig.imgsize %>", sendurl: "../../tools/upload_ajax.ashx", swf: "../../scripts/webuploader/uploader.swf" });
 
            $(".attach-btn").click(function () {
                showAttachDialog();
            });
            //设置封面图片的样式
            $(".photo-list ul li .img-box img").each(function () {
                if ($(this).attr("src") == $("#hidFocusPhoto").val()) {
                    $(this).parent().addClass("selected");
                }
            });

            $("#selectmoduleinfo").click(function () {

                selectmodule("txtLinkUrl");
            });

            function selectmodule(txtUrl) {

                var d = top.dialog({
                    title: '选择模块链接',
                    url: "/admin/dialog/selectmodulelink.aspx",
                    height: 420,
                    width: 440,
                    onclose: function () {

                        var imgUrl = this.returnValue; //获取返回值
                        if (imgUrl.length > 0) {

                            $("#" + txtUrl).val(imgUrl);
                        }


                    }
                }).showModal();

            }

        });

        
    </script>
</head>
<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="tuwen_shucai_categorylist.aspx" class="home"><i class="iconfont icon-home"></i><span>图文素材分类</span></a>
          <i class="arrow iconfont icon-arrow-right"></i><a href="tuwen_shucai_list.aspx?id=<%=categoryId %>"> <asp:Label ID="lblcategoryName" runat="server" Text=""></asp:Label></a>
          <i class="arrow iconfont icon-arrow-right"></i> <span>编辑图文文章信息</span>
        </div>
        <div class="line10"></div>
        <!--/导航栏-->

        <!--内容-->
      <div id="floatHead" class="content-tab-wrap">
  <div class="content-tab">
    <div class="content-tab-ul-wrap">
                    <ul>
                        <li><a href="javascript:;" onclick="tabs(this);" class="selected">图文---文章信息</a></li>
                        
                    </ul>
                </div>
            </div>
        </div>

        <div class="tab-content">
            <dl>
                <dt>标题</dt>
                <dd>
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="input normal" datatype="*2-100" sucmsg=" " nullmsg="请添加标题"/>
                    <span class="Validform_checktip">*标题最多100个字符</span>
                </dd>
            </dl>

           <dl id="div_author" >
                <dt>作者（选填）</dt>
                <dd>
                    <asp:TextBox ID="txtAuthor" runat="server" CssClass="input normal" datatype="*0-10" sucmsg=" "></asp:TextBox>
                      <span class="Validform_checktip">1-10个字符</span>
                </dd>
            </dl>

            <dl>
                <dt>封面图片</dt>
                <dd>
                     <asp:Image ID="imgUrl" CssClass="upload-path-img" runat="server" style=" max-height:80px; background-color:#A0B4DC;" ImageUrl="~/images/noneimg.jpg" /><br />
                    <asp:TextBox ID="txtImgUrl" runat="server" CssClass="input normal upload-path" datatype="*2-800" sucmsg=" " nullmsg="请添加封面图片" />
                    <div class="upload-box upload-img"></div>
                      <span class="Validform_checktip">（图片建议尺寸：<asp:Literal ID="litpicCC" runat="server" Text="200 x 200"></asp:Literal>像素,必须小于1m）</span>
                </dd>
            </dl>

             <dl>
                <dt>摘要</dt>
                <dd>
                    <asp:TextBox ID="txtZhaiyao" runat="server" CssClass="input" TextMode="MultiLine" datatype="*0-255" sucmsg=" "></asp:TextBox>
                    <span class="Validform_checktip">255字符之内</span>
                </dd>
            </dl>

            <dl>
                <dt>正文</dt>
                <dd>
                    <textarea id="txtContent" class="editor" style="visibility: hidden;" runat="server"  datatype="*1-2000" sucmsg=" " nullmsg="请添加正文内容"></textarea>
               <span class="Validform_checktip">*正文内的图片必须是本地上传；若为从其他网页上复制过来，请上传到服务器。</span>
                     </dd>
            </dl>

            <dl>
                <dt>外链地址</dt>
                <dd>
                    <asp:TextBox ID="txtLinkUrl" runat="server" MaxLength="255" CssClass="input normal" />
                    <input id="selectmoduleinfo" type="button" value="选择" class="btn" />
                    <span class="Validform_checktip">填写后,图文详情页面底部的“阅读原文”点击直接跳转到该网址</span>
                </dd>
            </dl>

            <dl>
                <dt>排序数字</dt>
                <dd>
                    <asp:TextBox ID="txtSortId" runat="server" CssClass="input small" datatype="n" sucmsg=" ">9</asp:TextBox>
                    <span class="Validform_checktip">*数字，越小越向前</span>
                </dd>
            </dl>

             
             
        </div>
        <!--/内容-->

        <!--工具栏-->
        <div class="page-footer">
            <div class="btn-list">
                <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btn" OnClick="btnSubmit_Click" />
                
                <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
            </div>
            <div class="clear"></div>
        </div>
        <!--/工具栏-->
    </form>
</body>
</html>
